#include "AudioPlayer.h"
AudioPlayer::AudioPlayer(const char *fileName,bool isLoop /* = false */)
{
	//const QString filePath = QString(fileName);
	mSoundPlayer=new QSound(QString(fileName),0);
	if (isLoop)
	{
		mSoundPlayer->setLoops(-1);
	}
}
AudioPlayer::~AudioPlayer()
{
	if (mSoundPlayer)
	{
		delete mSoundPlayer;
		mSoundPlayer = 0;
	}
}